package com.aiyige.model.request;

import com.aiyige.base.api.ApiManager;
import com.aiyige.model.task.Task;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by xiachao
 */

public class DeleteTaskRequest {


    Task task;

    private DeleteTaskRequest(Builder builder) {
        setTask(builder.task);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public Task getTask() {
        return task;
    }

    public void setTask(Task task) {
        this.task = task;
    }

    public static final class Builder {
        private Task task;

        private Builder() {
        }

        public Builder task(Task task) {
            this.task = task;
            return this;
        }

        public Call<ResponseBody> build() {
            return ApiManager.getService().deleteTasks(this.task);
        }

    }
}
